'''
Created on 09/06/2014

@author: Hector
'''
from PFilter import PFilter
#from SuperOP  import SOP
from Logic import SOP
from SessionManager import SessionManager

class Control():
    '''
    classdocs
    '''
def iniciar(arg):
    filter = PFilter()
    filter.filterParameters(arg)
    op = SOP(filter)
    if filter.loadSession:
        print "loading session"
        sm = SessionManager()
        session = sm.load(filter.getSessionFile())
        op.continueMergeSession(session)
        
    else: 
        print "Output: ", filter.getOutputPath()
        print "Input: ", filter.getInputPath()
        print "Starting"
        op.mergeAll()
        
    print "Merge success!!\n  ","\n exiting..."